from selenium.webdriver.common.by import By
from base import Base
class Page(Base):
    def sousuo1(self):
        loc=(By.XPATH,'//android.widget.TextView[@text="搜索菜谱"]')
        ele=self.find_ele(loc)
        return ele
    def sousuo2(self):
        loc=(By.CLASS_NAME,'android.widget.EditText')
        ele=self.find_ele(loc)
        return ele
    def djsousuo(self):
        loc=(By.XPATH,'//android.widget.TextView[@text="搜索"]')
        ele=self.find_ele(loc)
        return ele
    def tupian(self):
        loc=(By.XPATH,'(//android.widget.ImageView[@resource-id="com.xiachufang:id/common_photo_image_view"])[1]')
        ele=self.find_ele(loc)
        return ele
    def shoucang(self):
        loc=(By.ID,'com.xiachufang:id/recipe_bto_nav_bar_collect')
        ele=self.find_ele(loc)
        return ele
    def fanhui1(self):
        loc=(By.ANDROID_UIAUTOMATOR,'new UiSelector().description("返回")')
        ele=self.find_ele(loc)
        return ele
    def fanhui2(self):
        loc=(By.ACCESSIBILITY_ID,'返回')
        ele=self.find_ele(loc)
        return ele
    def daunyan(self):
        loc=(By.XPATH,'(//android.widget.TextView[@resource-id="com.xiachufang:id/common_first_text"])[1]')
        ele=self.find_ele(loc)
        return ele
